/**
 * 统一字幕
 */

const { ccclass, property } = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.Label)
    label: cc.Label = null;

    @property
    text: string = 'hello';

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start() {

    }

    /** 显示提示文字  time 显示时间 */
    showTipNodeLab(str: string, time: number, sayInfo: any) {
        // cc.Tween.stopAllByTarget(this.tipNode);
        //     this.tipNode.active = AudioManager.isSubtitle;

        //     let lab = this.tipNode.getComponentInChildren(cc.Label);
        //     if (str != "") {
        //         lab.string = str;
        //     }
        //     cc.tween(this.tipNode)
        //         .to(0.5, { opacity: 255 })
        //         .delay(time)
        //         .call(() => {
        //             if (sayInfo.armAni) {
        //                 this.runArmAni(sayInfo.armAni, sayInfo.armAni.daiji, sayInfo.armAni.node);
        //             }
        //             if (this.interJson["sayUpdateIsWin"]) {
        //                 this.updateIsWin();
        //             }
        //         }).to(0.5, { opacity: 0 }).start();
        // };
    }
}
